create  table jms_dm.dm_door_sign_rate_detail_dt
(
date_time date COMMENT '日期' ,
scan_site_code varchar(100) COMMENT '扫描网点code' ,
agent_code varchar(100) COMMENT '代理区code' ,
waybill_no varchar(100) COMMENT '运单号' ,
manage_code varchar(100) COMMENT '管理大区code' ,
manage_name varchar(100) COMMENT '管理大区' ,
provider_id varchar(100) COMMENT '省份id' ,
provider_desc varchar(100) COMMENT '省份' ,



agent_name varchar(100) COMMENT '代理区' ,
fran_code varchar(100) COMMENT '加盟商code' ,
fran_name varchar(100) COMMENT '加盟商' ,
scan_site_name varchar(100) COMMENT '扫描网点code' ,

signed_type varchar(200) COMMENT '签收类型' ,
timely_type  bigint COMMENT '1入库,2签收' ,
is_timely bigint COMMENT '时效签收' ,
is_door  bigint COMMENT '是否送货上门，1是，0否' ,
is_stage_sign  bigint COMMENT '是否送入驿站，1是，0否' ,
is_xusign  bigint COMMENT '是否虚假签收' ,
is_writeback_flag bigint COMMENT '是否驿站上门票数，1是，0否' ,
is_performance_flag bigint COMMENT '是否标电联票数，1是，0否' ,
expand3 varchar(100) COMMENT '预留字段' ,
expand4 varchar(100) COMMENT '预留字段' ,
expand5 varchar(100) COMMENT '预留字段'
  )
ENGINE=OLAP
DUPLICATE KEY(date_time,scan_site_code,agent_code)
comment '送货上门率明细表'
PARTITION BY RANGE (date_time) (
   START ('2022-11-01') END ('2022-12-09') EVERY (INTERVAL 1 day))
   DISTRIBUTED BY HASH(date_time,scan_site_code,agent_code) BUCKETS 4
PROPERTIES (
'replication_num' = '1',
'dynamic_partition.enable' = 'true',
'dynamic_partition.time_unit' = 'DAY',
'dynamic_partition.time_zone' = 'Asia/Shanghai',
'dynamic_partition.start' = '-180',
'dynamic_partition.end' = '3',
'dynamic_partition.prefix' = 'p',
'dynamic_partition.buckets' = '4',
'in_memory' = 'false',
'storage_format' = 'V2'
)
